<?php $this->headScript()->captureStart("PREPEND") ?>
$(document).ready(function() {
    function path()
    {
        var args = arguments,
            result = []
            ;
        for(var i = 0; i < args.length; i++)
            result.push(args[i].replace('@', '<?php echo $this->baseUrl('ui/js/syntaxhighlighter/');?>'));
        return result;
    };

    SyntaxHighlighter.autoloader.apply(null, path(
      'applescript            @shBrushAppleScript.js',
      'actionscript3 as3      @shBrushAS3.js',
      'bash shell             @shBrushBash.js',
      'coldfusion cf          @shBrushColdFusion.js',
      'cpp c                  @shBrushCpp.js',
      'c# c-sharp csharp      @shBrushCSharp.js',
      'css                    @shBrushCss.js',
      'delphi pascal          @shBrushDelphi.js',
      'diff patch pas         @shBrushDiff.js',
      'erl erlang             @shBrushErlang.js',
      'groovy                 @shBrushGroovy.js',
      'java                   @shBrushJava.js',
      'jfx javafx             @shBrushJavaFX.js',
      'js jscript javascript  @shBrushJScript.js',
      'perl pl                @shBrushPerl.js',
      'php                    @shBrushPhp.js',
      'text plain             @shBrushPlain.js',
      'py python              @shBrushPython.js',
      'ruby rails ror rb      @shBrushRuby.js',
      'sass scss              @shBrushSass.js',
      'scala                  @shBrushScala.js',
      'sql                    @shBrushSql.js',
      'vb vbnet               @shBrushVb.js',
      'xml xhtml xslt html    @shBrushXml.js'
    ));

    SyntaxHighlighter.all();
});
<?php $this->headScript()->captureEnd() ?>

<?php 
    $this->headScript() 
 
        ->prependFile($this->baseUrl('ui/js/custom/default.js?20110731'))
        ->prependFile($this->baseUrl('ui/js/syntaxhighlighter/shAutoloader.js'))
        ->prependFile($this->baseUrl('ui/js/syntaxhighlighter/shCore.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/tmpl/jquery.tmpl.min.js?20110731'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/imageGallery/jquery.image-gallery.js?20110731'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/pagination/jquery.pagination.js?20110731'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/validation/localization/messages_cn.js'))
        
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/layout/jquery.layout-latest.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/validation/jquery.validate.min.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/form/jquery.form.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/flash/jquery.flash.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/cookie/jquery.cookie.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/bgiframe/jquery.bgiframe-2.1.2.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/livequery/jquery.livequery.js'))
        ->prependFile($this->baseUrl('ui/js/jquery/plugins/jqueryui/jquery-ui-1.8.16.min.js'))
        ->prependFile($this->baseUrl('ui/js/localization/languages_cn.js'))
        ;
?>


<?php $this->headScript()->captureStart("PREPEND") ?>
$.url = {
    'base'          : '<?php echo $this->baseUrl('/');?>',
    'saveBuddy'     : '<?php echo $this->url(array('module'=>'default', 'controller'=>'buddy', 'action'=>'save-buddy'), "default", true) ?>', 
    'captcha'       : '<?php echo $this->url(array('module'=>'default', 'controller'=>'captcha', 'action'=>'create'),'default',true) ?>', 
    'deleteArticle' : '<?php echo $this->url(array('module'=>'publish', 'controller'=>'article', 'action'=>'delete'),'default',true) ?>', 
};
<?php $this->headScript()->captureEnd() ?>


<?php 
    $this->headScript() 
        ->prependFile($this->baseUrl('ui/js/jquery/jquery-1.7.min.js'))
    ;
?>


